package DuoTai;

public class Company {
    public static void main(String[] args) {
        Boss a = new Boss();
        a.manager(new saleMan());
    }
}

class Boss{
    public void manager(Employee e){
        e.work();
    }
}

class Employee{
    public void work(){
        System.out.println("干活");
    }
}

class engineer extends Employee{
    public void work(){
        System.out.println("设计产品");
    }
}

class saleMan extends Employee{
    public void work(){
        System.out.println("卖产品");
    }
}

class bookkeeper extends Employee{
    public void work(){
        System.out.println("结算");
    }
}
